-- GENERATED SPELL FOR [Dragonmaw Shadowwarder] --


function spell0_1038(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(6223,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1038', 18000, 1)
end

function spell1_1038(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20807,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1038', 3000, 1)
end

function Sorts_1038(pUnit, Event)
local choix_sorts_1038 = math.random(0, 1)
if choix_sorts_1038 == 0 then
pUnit:RegisterEvent('spell0_1038', 1, 1)
end
if choix_sorts_1038 == 1 then
pUnit:RegisterEvent('spell1_1038', 1, 1)
end
end

function mob1038_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1038', math.random(1500, 3000), 1)
end

function mob1038_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1038_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1038_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1038, 1, 'mob1038_Action')
RegisterUnitEvent(1038, 2, 'mob1038_Leave')
RegisterUnitEvent(1038, 3, 'mob1038_Kill')
RegisterUnitEvent(1038, 4, 'mob1038_Die')
